﻿<phone:PhoneApplicationPage x:Class="WPNEXT.Views.CategoryPage"
                            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                            xmlns:WpNext="clr-namespace:WPNextTools.NControls;assembly=WPNextTools"
                            xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                            xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                            xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
                            xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
                            DataContext="{Binding CategoryVM,
                                                  Source={StaticResource Locator}}"
                            FontFamily="{StaticResource PhoneFontFamilyNormal}"
                            FontSize="{StaticResource PhoneFontSizeNormal}"
                            Foreground="{StaticResource PhoneForegroundBrush}"
                            Orientation="Portrait"
                            SupportedOrientations="Portrait"
                            shell:SystemTray.IsVisible="True"
                            mc:Ignorable="d">

    <!--  LayoutRoot is the root grid where all page content is placed  -->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <WpNext:PhotoListBox x:Name="CategoryWall"
                             Margin="22,0,22,0"
                             HasUnionHeader="True"
                             ItemsSource="{Binding Items}"
                             ScrollViewer.VerticalScrollBarVisibility="Hidden">
            <WpNext:PhotoListBox.StrategyDefinition>
                <WpNext:PhotoVirtualizationStrategyDefinition ColumnCount="2"
                                                              ColumnMargin="36"
                                                              LeftRightMargin="22"
                                                              Orientation="Vertical" />
            </WpNext:PhotoListBox.StrategyDefinition>
            <WpNext:PhotoListBox.ItemTemplate>
                <DataTemplate>
                    <Grid Background="White">
                        <Image Source="{Binding Url}" />
                    </Grid>
                </DataTemplate>
            </WpNext:PhotoListBox.ItemTemplate>
        </WpNext:PhotoListBox>
    </Grid>

</phone:PhoneApplicationPage>